package com.cn.hospital.controller.system;

import cn.dev33.satoken.annotation.SaCheckPermission;
import com.cn.hospital.service.system.SysRoleService;
import org.apache.dubbo.config.annotation.Reference;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
public class SysRoleController {

    @Reference
    SysRoleService sysRoleService;

    @SaCheckPermission("findUserRoleById")
    @RequestMapping("findUserRoleById")
    public List<String> findUserRoleById(@RequestBody Long id){
        return sysRoleService.findUserRoleById(id);
    }

    @RequestMapping("find")
    public List<String> find(@RequestBody Long id){
        return sysRoleService.findUserRoleById(id);
    }
}
